
// template of entity needed for spawning
class EntTemplate
{
public:
	//=== vars ===//
	//=== identity vars ===//
	irr::core::stringc			m_strTemplateName;		// template name
	S32							m_s32TemplateId;		// id of entity template

	irr::core::stringc			m_strEntCommonName;		// entity common name
	EEntityType					m_eEntType;				// type of entity

	//=== collision vars ===//
	irr::core::stringc			m_strScriptCollisionFile;		// file of script with collision functions
	irr::core::stringc			m_strScriptCollisionCallback;	// call script function on collision
	EPhysFilterTypes			m_eCollisionGroup;				// collistion group type bit flag
	EPhysFilterTypes			m_eCollisionMask;				// mask of all collision group types entity collides with

	//=== physical vars ===//
	EPhysGeomType				m_eShapeType;					// shape type 0=none 1=box 2=sphere 3=capsule 4=cylinder 5=convex mesh 6=concave mesh 7=box from model bbox
	btVector3					m_vec3ShapeDimensions;			// dimensions of shape ( if not sphere )
	F32							m_f32Radius;					// radius ( if sphere )
	F32							m_f32Mass;						// mass
	F32							m_f32Friction;					// friction
	F32							m_f32Restitution;				//
	F32							m_f32LinearDamping;				// damping
	F32							m_f32AngularDamping;			// damping
	btVector3					m_avec3ConstraintData[4];		// constraints

	//=== graphics vars ===//
	int							m_iModelType;					// 0=unknown 1=mesh 2=billboard
	irr::core::stringc			m_strMeshFile;					// file with mesh or if billboard then is billbard texture file
	irr::core::stringc			m_astrTextures[4];				// textures for mesh
	F32							m_f32ModelScale;				// scale of graphics model
	F32							m_f32BillboardWidth;			// width if billboard
	F32							m_f32BillboardHeight;			// height if billboard

	//=== state vars ===//
	BOOL						m_bDeleted;						// if true entity is about to be deleted or is deleted
	S32							m_s32LifeTimeMs;				// time entity should live.. -1 = forever
	S32							m_s32Flags;						// flags .. not yet defined
	S32							m_s32Res[4];					// reserved for future use

	//=== constructor ===//
	EntTemplate();
	//=== destructor ===//
	~EntTemplate();

	//=== properties ===//
	irr::core::stringc	GetCommonName( void ) const			{ return m_strEntCommonName; }
	void			SetCommonName( const char * pName )		{ m_strEntCommonName = pName; }
	S32				GetTemplateId() const					{ return m_s32TemplateId; }
	void			SetTemplateId(S32 s32TemplateId)		{ m_s32TemplateId = s32TemplateId; }
	EEntityType		GetEntType() const						{ return m_eEntType; }
	void			SetEntType( EEntityType eType )			{ m_eEntType = eType; }

	BOOL			GetDeleted() const						{ return m_bDeleted; }
	void			SetDeleted( BOOL Value)					{ m_bDeleted = Value; }
	void			SetLifetime( S32 s32LifeTimeMs )		{ m_s32LifeTimeMs = s32LifeTimeMs; }
	S32				GetLifetime() const						{ return m_s32LifeTimeMs; }


	//=== methods ===//

};
